<template>
  <van-nav-bar
    :left-text="$route.meta.title"
    @click-right="onClickNavBarRight"
  >
    <template slot="title"><img class="glabal-nav-bar-logo" src="../assets/imgs/logo.png"/></template>
    <template slot="right"><img class="glabal-nav-bar-msg" src="../assets/imgs/msg_b.png"/></template>
  </van-nav-bar>
</template>

<script>
  import { NavBar } from 'vant';

  export default {
    name: 'global-nav-bar-home',
    components: {
      [NavBar.name]: NavBar
    },
    methods: {
      onClickNavBarRight() {
        this.$router.push({name: 'noticeIndex'})
      }
    }
  }
</script>

<style>
  .glabal-nav-bar-logo {
    position: relative;
    top: 6px;
    height: 31px;
  }
  .glabal-nav-bar-msg {
    height: 14px;
  }
</style>
